package data.partition;

import java.util.ArrayList;

//Vertex define
class Vertex{
	int name;
	String label;
	boolean visit;
	ArrayList<Edge> neighbors;

	public Vertex() {		
		this.label = "";
		this.neighbors = new ArrayList<Edge>();	
	}

	public Vertex(int name) {
		this.name = name;
		this.label = "";
		this.neighbors = new ArrayList<Edge>();		
	}

	public Vertex(int name, String label) {
		this.name = name;
		this.label = label;
		this.neighbors = new ArrayList<Edge>();		
	}

	public String L() {
		return this.label;
	}

	@Override
	public boolean equals(Object obj) {
		boolean check = false;
		if (obj == null)
			return false;
		else if (obj == this)
			return true;
		else {
			if (obj instanceof Vertex && obj.getClass() == this.getClass()) {
				final Vertex t = (Vertex) obj;
				check = this.name == t.name;
			}
		}
		return check;
	}

	@Override
	public int hashCode() {
		int hash = 7;
		hash = (37 * hash) + this.name;
		return hash;
	}

	@Override
	public String toString() {
		return name + "," + label;
	}

}

class Edge{
	int target;

	public Edge() {		
	}

	public Edge(int target) {
		this.target = target;
	}
}

